package org.example.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;

import lombok.Data;

/**
 * 
 * @TableName erpmaterialinventory
 */
@TableName(value ="erpmaterialinventory")
@Data
public class Erpmaterialinventory implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer id;
    private Integer mid;
    private Integer aid;

    /**
     * 
     */
    private String materialName;

    /**
     * 
     */
    private String categoryName;

    /**
     * 
     */
    private String standard;
    private String remark;

    /**
     * 
     */
    private String model;
    private String name;


    /**
     * 
     */
    private String commodityUnit;

    /**
     * 
     */
    private String sku;

    /**
     * 
     */
    private String mfrs;

    /**
     * 
     */
    private String color;

    /**
     * 
     */
    private String barCode;


    private BigDecimal totalIn;
    private BigDecimal totalOut;
    private BigDecimal totalOperNumber;
    private BigDecimal sumsl;
    private BigDecimal wholesaledecimal;
    private Long headerId;
    private BigDecimal totalPrice;
    private BigDecimal taxRate;
    private BigDecimal basicNumber;
    private BigDecimal unitPrice;
    private BigDecimal allPrice;
    private BigDecimal operNumber;
    private Long depotId;

    /**
     * 税额
     */
    private BigDecimal taxMoney;
    private BigDecimal taxLastMoney;

    private Long anotherDepotId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Erpmaterialinventory other = (Erpmaterialinventory) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMaterialName() == null ? other.getMaterialName() == null : this.getMaterialName().equals(other.getMaterialName()))
            && (this.getCategoryName() == null ? other.getCategoryName() == null : this.getCategoryName().equals(other.getCategoryName()))
            && (this.getStandard() == null ? other.getStandard() == null : this.getStandard().equals(other.getStandard()))
            && (this.getModel() == null ? other.getModel() == null : this.getModel().equals(other.getModel()))
            && (this.getCommodityUnit() == null ? other.getCommodityUnit() == null : this.getCommodityUnit().equals(other.getCommodityUnit()))
            && (this.getSku() == null ? other.getSku() == null : this.getSku().equals(other.getSku()))
            && (this.getMfrs() == null ? other.getMfrs() == null : this.getMfrs().equals(other.getMfrs()))
            && (this.getColor() == null ? other.getColor() == null : this.getColor().equals(other.getColor()))
            && (this.getBarCode() == null ? other.getBarCode() == null : this.getBarCode().equals(other.getBarCode()))
            && (this.getTotalIn() == null ? other.getTotalIn() == null : this.getTotalIn().equals(other.getTotalIn()))
            && (this.getTotalOut() == null ? other.getTotalOut() == null : this.getTotalOut().equals(other.getTotalOut()))
            && (this.getTotalOperNumber()== null ? other.getTotalOperNumber() == null : this.getTotalOperNumber().equals(other.getTotalOperNumber()))

                ;

    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMaterialName() == null) ? 0 : getMaterialName().hashCode());
        result = prime * result + ((getCategoryName() == null) ? 0 : getCategoryName().hashCode());
        result = prime * result + ((getStandard() == null) ? 0 : getStandard().hashCode());
        result = prime * result + ((getModel() == null) ? 0 : getModel().hashCode());
        result = prime * result + ((getCommodityUnit() == null) ? 0 : getCommodityUnit().hashCode());
        result = prime * result + ((getSku() == null) ? 0 : getSku().hashCode());
        result = prime * result + ((getMfrs() == null) ? 0 : getMfrs().hashCode());
        result = prime * result + ((getColor() == null) ? 0 : getColor().hashCode());
        result = prime * result + ((getBarCode() == null) ? 0 : getBarCode().hashCode());
        result = prime * result + ((getTotalIn() == null) ? 0 : getTotalIn().hashCode());
        result = prime * result + ((getTotalOut() == null) ? 0 : getTotalOut().hashCode());
        result = prime * result + ((getTotalOperNumber() == null) ? 0 : getTotalOperNumber().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", materialName=").append(materialName);
        sb.append(", categoryName=").append(categoryName);
        sb.append(", standard=").append(standard);
        sb.append(", model=").append(model);
        sb.append(", commodityUnit=").append(commodityUnit);
        sb.append(", sku=").append(sku);
        sb.append(", mfrs=").append(mfrs);
        sb.append(", color=").append(color);
        sb.append(", barCode=").append(barCode);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append(", totalIn=").append(totalIn);
        sb.append(", totalOut=").append(totalOut);
        sb.append(", totalOperNumber=").append(totalOperNumber);
        sb.append("]");
        return sb.toString();
    }
}